using System;
using InfoTech.Mvc.Core.Models;
using InfoTech.Utilities.Reflection;
using System.ComponentModel.DataAnnotations;
using InfoTech.Mvc.Core.UI.Validation;
using InfoTech.LanTranh.MucVu.Bussiness;

namespace InfoTech.Mvc.LanTranh.MucVu.Models
{
	[Serializable]
	public partial class SOTANHIENModel : ObjModel<SOTANHIEN>, IModelConverter
	{

		#region Constructor

		public SOTANHIENModel()
			: base()
		{
		}

		public SOTANHIENModel(SOTANHIEN obj)
			: base(obj)
		{
		}

		#endregion

		#region Fields

		private System.Guid? _matanhien;

		private System.Guid? _machucvu;

		private System.Guid? _magiaodan;

		private System.String _diadiem;

		private System.String _dongtu;

		private System.String _phucvutai;

		private System.Boolean _hoituc;

		private System.Int32? _ngay;

		private System.Int32? _thang;

		private System.Int32? _nam;

		#endregion

		#region Properties

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Guid? MATANHIEN
		{
			get
			{
				return _matanhien;
			}
			set
			{
				_matanhien = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Guid? MACHUCVU
		{
			get
			{
				return _machucvu;
			}
			set
			{
				_machucvu = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Guid? MAGIAODAN
		{
			get
			{
				return _magiaodan;
			}
			set
			{
				_magiaodan = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		[StringLength(1000, ErrorMessage= "Value must be under 1000 characters")]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.String DIADIEM
		{
			get
			{
				return _diadiem;
			}
			set
			{
				_diadiem = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		[StringLength(1000, ErrorMessage= "Value must be under 1000 characters")]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.String DONGTU
		{
			get
			{
				return _dongtu;
			}
			set
			{
				_dongtu = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		[StringLength(1000, ErrorMessage= "Value must be under 1000 characters")]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.String PHUCVUTAI
		{
			get
			{
				return _phucvutai;
			}
			set
			{
				_phucvutai = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Boolean HOITUC
		{
			get
			{
				return _hoituc;
			}
			set
			{
				_hoituc = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Int32? NGAY
		{
			get
			{
				return _ngay;
			}
			set
			{
				_ngay = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Int32? THANG
		{
			get
			{
				return _thang;
			}
			set
			{
				_thang = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Int32? NAM
		{
			get
			{
				return _nam;
			}
			set
			{
				_nam = value;
			}
		}

		#endregion

		#region IModelConverter

		public System.Type Reflector()
		{
			return typeof(SOTANHIENModel);
		}
		public object GetModel()
		{
			return this;
		}

		#endregion

		#region Overrides of Model<SOTANHIEN>

		public override void ReverttoModel()
		{
			CreateModel(this);
		}

		public override SOTANHIEN ReverttoBussiness()
		{
			return CreateBussiness(this);
		}

		#endregion

		#region Operators

		public static implicit operator SOTANHIENModel(SOTANHIEN obj)
		{
			return new SOTANHIENModel(obj);
		}
		public static implicit operator SOTANHIEN(SOTANHIENModel obj)
		{
			return obj.ReverttoBussiness();
		}

		#endregion

	}
}
